﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaintainStationeryItems.aspx.cs" Inherits="Maintain_supplier_information.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
<div style="margin-left: 280px">
    <asp:Label ID="lbl_heading" runat="server" style="font-weight: 700; font-size: xx-large;" Text="Maintain Stationery Items"></asp:Label>
</div>
<br />
<asp:Label ID="lbl_category" runat="server" Text="Category:"></asp:Label>
&nbsp;<asp:DropDownList ID="ddl_Category" runat="server">
    <asp:ListItem>All</asp:ListItem>
    <asp:ListItem>Clip</asp:ListItem>
    <asp:ListItem>Paper</asp:ListItem>
    <asp:ListItem>Puncher</asp:ListItem>
    <asp:ListItem>Pen</asp:ListItem>
    <asp:ListItem>Pad</asp:ListItem>
    <asp:ListItem>Envelope</asp:ListItem>
    <asp:ListItem>Exercise</asp:ListItem>
    <asp:ListItem>File</asp:ListItem>
</asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btn_search" runat="server" Text="Search" Height="24px" OnClick="btn_search_Click" />
    <div>
    
        <asp:GridView ID="GridView1" runat="server" OnRowCancelingEdit="GridView1_RowCancelingEdit" AutoGenerateColumns="False"  OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowCommand="GridView1_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="Item Code">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ItemCode") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Category">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("CategoryName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                
                
                <asp:TemplateField HeaderText="ItemName">
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("ItemName") %>'></asp:Label>
                    </ItemTemplate>

                </asp:TemplateField>
                
                
                <asp:TemplateField HeaderText="Reorder Level">
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("ReorderLevel") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ReorderLevel") %>'></asp:TextBox>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="Ateast value should be 1" ControlToValidate="TextBox1" MaximumValue="2147483647" MinimumValue="1" Type="Integer"></asp:RangeValidator>
                    </EditItemTemplate>
                </asp:TemplateField>

                
                <asp:TemplateField HeaderText="Reorder Qty">
                    <ItemTemplate>
                        <asp:Label ID="Label5" runat="server" Text='<%# Eval("ReorderQty") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ReorderQty") %>'></asp:TextBox>
                        <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="Ateast value should be 1" ControlToValidate="TextBox2" MaximumValue="3276487" MinimumValue="1" Type="Integer"></asp:RangeValidator>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Available Qty">
                    <ItemTemplate>
                        <asp:Label ID="Label6" runat="server" Text='<%# Eval("AvailableQty") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                
                
                <asp:ButtonField ButtonType="Button" CommandName="Select" Text="Details" />
                
                <asp:CommandField ShowEditButton="True" />
                
            </Columns>
        </asp:GridView>
    
    </div>
        <br />
        <asp:Button ID="Btn_AddNewItem" runat="server" Text="Add new item" OnClick="Btn_AddNewItem_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Btn_Cancel" runat="server" Text="Cancel" />
        <br />
        <asp:GridView ID="gdview_details" runat="server">
        </asp:GridView>
    </form>
</body>
</html>
